﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="UCNguoidung.ascx.cs" Inherits="Admin_UCControls_UCNguoidung" %>

<table width="100%">
   
    <tr>
        <td>
            <asp:GridView ID="GridNguoiDung" runat="server" AutoGenerateColumns="False" DataKeyNames="ID"
               OnRowCommand="GridNguoiDung_RowCommand"  
               CssClass="mGrid"  
               PagerStyle-CssClass="pgr"  
               AlternatingRowStyle-CssClass="alt" OnPageIndexChanging="GridNguoiDung_PageIndexChanging">
                <Columns>
                   <asp:TemplateField HeaderText="STT">
                    <ItemTemplate>
                         <%# Container.DataItemIndex + 1 %>  
                    </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Tên người dùng">
                        <ItemTemplate>
                            <%# Eval("TenNguoiDung")%>
                        </ItemTemplate>
                    </asp:TemplateField>
                     <asp:TemplateField HeaderText="Tên đăng nhập">
                        <ItemTemplate>
                            <%# Eval("TenDangNhap")%>
                        </ItemTemplate>
                    </asp:TemplateField>
                     <asp:TemplateField HeaderText="Quyền">
                        <ItemTemplate>
                            <%# Eval("Quyen")%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField ItemStyle-Width="65px">
                       <ItemTemplate>
                        <asp:LinkButton ID="btnSua" runat="server" Text="Sửa" CommandName="Sua" CommandArgument='<%#Bind("Id")%>' />
                         &nbsp;&nbsp;<asp:LinkButton ID="btnXoa" runat="server" Text="Xóa"  CommandName="Xoa" CommandArgument='<%#Bind("Id")%>' OnClientClick="javascript:return confirm('Có chắc xóa Người dùng này không?');"/>
                  </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </td>
    </tr>
     <tr>
    <td style="padding-top:5px">
        <asp:Button ID="btnThemMoi" runat="server" Text="Thêm mới" OnClick="btnThemMoi_Click" /></td>
    </tr>
</table>
